package ltTest.entity;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;

public class User implements Serializable {
	
	
	/*public static void main(String[] args) {
		try {
			User user = new User();
			ObjectMapper objectMapper = new ObjectMapper();
			objectMapper.configure(SerializationFeature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED, true);
			objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH-mm-ssS"));
			
			String string = objectMapper.writeValueAsString(user);
			System.out.println(string);
		} catch (JsonProcessingException e) {
			e.printStackTrace();
		}
	}*/

	int id;
	int x;
	int y;
	int add;
	String name;
	Date date = new Date();
	public int getX() {
		return x;
	}
	public void setX(int x) {
		this.x = x;
	}
	public int getY() {
		return y;
	}
	public void setY(int y) {
		this.y = y;
	}
	public int getAdd() {
		return add;
	}
	public void setAdd(int add) {
		this.add = add;
	}
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Override
	public String toString() {
		return "User [x=" + x + ", y=" + y + ", add=" + add + ", name=" + name + ", date=" + date + "]";
	}
	public User(int x, int y, int add, Date date) {
		super();
		System.out.println("you参构造");
		this.x = x;
		this.y = y;
		this.add = add;
		this.date = date;
	}
	public User() {
		super();
		System.out.println("无参构造");
		// TODO Auto-generated constructor stub
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	
	
}
